package studio.raptor.dispatcher.server.graph;


/**
 * @author jack
 * @since 1.0
 */
public class EventNode {

  private final String eventId;

  private String status;

  public EventNode(String eventId) {
    this.eventId = eventId;
  }

  public EventNode(String eventId, String status) {
    this.eventId = eventId;
    this.status = status;
  }

  public String getEventId() {
    return eventId;
  }

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    EventNode eventNode = (EventNode) o;

    return eventId != null ? eventId.equals(eventNode.eventId) : eventNode.eventId == null;
  }

  @Override
  public int hashCode() {
    return eventId != null ? eventId.hashCode() : 0;
  }

  @Override
  public String toString() {
    return "EventNode{" +
        "eventId='" + eventId + '\'' +
        ", status='" + status + '\'' +
        '}';
  }
}
